package org.thread.test06.demo02;

/**
 * 女孩
 * @author ZJL
 * @date 2025-03-14
 */
public class GirldThread extends Thread {
    /**
     * 女孩要拿的篮子
     */
    private Box box;
    /**
     * 女孩的姓名
     */
    private String name;
    public GirldThread(){

    }
    public GirldThread(Box box, String name) {
        this.box = box;
        this.name = name;
    }
    @Override
    public void run() {
        while (true) {
            box.take(name);
        }
    }
}
